home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
026-050
/
scopedisk46
/
mj-pgs
/
brkpts_t
< prev
next >
Wrap
Text File
|
1995-03-18
|
750b
|
20 lines
PRINT TAB(35)"Breakpoints"
PRINT "this program divides a range into geometrically ascending numbers which are"
PRINT "useful in designating the counts where the color should change in a plot of"
PRINT "a Mandelbrot or Julia set."
DEFINT h,j,l,n:WIDTH 77
PRINT :INPUT "number of breakpoints";n:DIM br(n)
INPUT "lowest and highest counts to consider";l,h:b=h-l:d=EXP(LOG(b)/(n-1))
PRINT :PRINT "breakpoints are:"
br(1)=1:FOR j=2 TO n:br(j)=br(j-1)*d:NEXT
FOR j=1 TO n-1:br(j)=CINT(l+br(j)):IF br(j)<=br(j-1) THEN br(j)=br(j-1)+1
PRINT br(j);:NEXT:br(n)=h-1:PRINT br(n)
PRINT :INPUT"do you want to write a bp file (y/n)";file$
IF file$="y" THEN
INPUT"name of file";f$
OPEN f$ FOR OUTPUT AS 1
FOR j=1 TO n:WRITE#1,br(j):NEXT
CLOSE#1
END IF
END